We are making this greater now.

Great help documentation is coming soon.




This page lets you view a history of execution of integration services. Each integration service is referred to as a pipeline, which is a series of processing steps, connected to an end point

  • Pipeline - a series of steps which either processes incoming data, or generates outgoing data
  • Endpoint - some connection to the outside world, such as a local or remote email address, or a local or remote web address

Configuring integration

Integration services are configured by editing two types of XML files:
  • /theme/integration.xml - the main integration configuration file, this lists endpoints and the path to a pipeline xml file for each endpoint
  • pipeline xml - each of these contains a series of steps to process data
From the manage integration screen you can click links to edit the main config file and the pipeline files if they exist.

 

Main Configuration file

A typical integration.xml file with a single end point looks like this:

<integration>
  <endpoint id="inbounce-syncro" type="http" address="/inbound\/mydata(?&lt;month&gt;.*).xlsx" pipelinePath="/integration/synchro.xml" direction="in"/>
</integration>

Each endpoint has the following properties

  • ID - some unique identifier
  • type - either http or email (at time of writing only http was implemented)
  • address - either the address to receive the incoming data from (in which case a regular expression is accepted) or to send data to. For regular expressions, you can use regex named groups, and the named values are added to the pipeline attributes collection so can be used in processing
  • pipelinePath - the path to the pipeline XML file within the website
 

Pipeline XML file

The pipeline XML file is a series of steps defined as nested XML elements. The outer most element is the first executed, and it then passes data along to the next step inside it. Some steps might contain multiple steps, such as for making decisions.

And example pipeline xml file looks like this:

<TransactionStep>
    <next class="JsRowStep">
        <jsPath>/theme/integration.js</jsPath>
        <execFn>parseMonth</execFn>
        <next class="RecordExecutionStep">
            <next class="ExcelInputStep">
                <useXml>true</useXml>
                <skipHeaderRow>true</skipHeaderRow>
                <processRows>true</processRows>
                <sheetNum>0</sheetNum>
                <next class="JsRowStep">
                    <jsPath>/theme/integration.js</jsPath>
                    <execFn>checkCreateProfile</execFn>    
                    <next class="SalesDataInserter">
                        <seriesName>sales-data</seriesName>
                        <column field="amount" column="10"/>
                        <column field="attributedTo" column="6"/>
                        <column field="fromDate" attribute="startDate"/>
                        <column field="toDate" attribute="endDate"/>
                    </next>
                </next>
            </next>
        </next>
    </next>  
</TransactionStep>

 

This example does the following:

  1. starts a transaction
  2. executes a javascript function to find the month from the file name
  3. records the execution of this pipeline for this month
  4. parses the incoming data file as an excel workbook
  5. feeds each row into a javascript function called checkCreateProfile, which checks that the person listed on that row exists and creates them if not, then feeds the row to the next step
  6. which inserts the data into a data series called "sales-data"
For reference, the example javascript might look like this:
function parseMonth(input) {
    print("parseMonth: " + pipeline.attributes.month);
    pipeline.attributes.startDate = "1/1/2015";
    pipeline.attributes.endDate = "31/1/2015";
    nextStep.exec(input);
}

function checkCreateProfile(ReportCategory, VehicleUsage, SalesDate, VehicleVIN, Dealership, DealershipCode, SalesID, AllocationSalesPersonName, VehicleModelName, Bm6, Total, ListPrice) {
    print("checkCreateProfile " + SalesID + " " + AllocationSalesPersonName);

    var profile = pipeline.thisOrg.findProfile(SalesID);
    if (profile == null) {
        var org = pipeline.thisOrg.getOrCreateChildOrg(DealershipCode, Dealership, "dealership");
        print("org", org.orgId);
        var member = pipeline.thisOrg.createMembership(SalesID, null, org, "car-sales");
        print("member", member);
    } else {
        print("found existing profile " + SalesID);
    }

    nextStep.exec(ReportCategory, VehicleUsage, SalesDate, VehicleVIN, Dealership, DealershipCode, SalesID, AllocationSalesPersonName, VehicleModelName, Bm6, Total, ListPrice);
}

 

Ask a question, or offer an answer